package com.qingxin.repertory.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 
 * @author Administrator
 * 流水账
 */
@Entity
@Table(name="repertory_account")
public class RepertoryAccount extends com.qingxin.sys.entity.BaseEntity implements
java.io.Serializable {

	private static final long serialVersionUID = 7025685462841514260L;
	
	private String accountid;//流水账id
	private String repertoryid;//库存id
	private BigDecimal number;// 数量
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date operate_time;//操作时间
	private String type; //0 新购  1 发放 2回收
	private String remark;//描述
	private String responsible;// 负责人
	private String createBy;
	private Date createTime;
	
	//
	public RepertoryAccount(String accountid, String repertoryid,
			BigDecimal number, Date operate_time, String type,
			String remark, String responsible, String createBy, Date createTime) {
		super();
		this.accountid = accountid;
		this.repertoryid = repertoryid;
		this.number = number;
		this.operate_time = operate_time;
		this.type = type;
		this.remark = remark;
		this.responsible = responsible;
		this.createBy = createBy;
		this.createTime = createTime;
	}
	
	//
	public RepertoryAccount() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "accountid", unique = true, nullable = false, length = 32)
	public String getAccountid() {
		return accountid;
	}
	public void setAccountid(String accountid) {
		this.accountid = accountid;
	}
	
	@Column(name="repertoryid",length = 32)
	public String getRepertoryid() {
		return repertoryid;
	}
	public void setRepertoryid(String repertoryid) {
		this.repertoryid = repertoryid;
	}
	
	@Column(name = "number", precision = 15, scale = 5)
	public BigDecimal getNumber() {
		return number;
	}
	public void setNumber(BigDecimal number) {
		this.number = number;
	}
	
	@Column(name="operate_time", length = 23)
	public Date getOperate_time() {
		return operate_time;
	}
	public void setOperate_time(Date operate_time) {
		this.operate_time = operate_time;
	}
	
	@Column(name="type", length = 1)
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	@Column(name="remark", length = 255)
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Column(name="responsible", length = 100)
	public String getResponsible() {
		return responsible;
	}
	public void setResponsible(String responsible) {
		this.responsible = responsible;
	}
	
	@Column(name="create_by", length = 32)
	public String getCreateBy() {
		return createBy;
	}
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	
	@Column(name="create_time", length = 23)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	
	
}
